import {defineStore} from "pinia"

export const useHistoryStore = defineStore("useHistory", () => {
    const history = {
        pageCount: 0,
        data: []
    }

    function updateHistoryData(data) {
        history.data = data
    }

    function updateHistoryPageCount(value) {
        history.pageCount = value
    }

    function getHistory() {
        return history
    }

    return {
        updateHistoryData,
        updateHistoryPageCount,
        getHistory
    }
})